// @ts-ignore
/* eslint-disable */

import { request } from "@umijs/max";



/** 获取文件夹列表 get */
export async function serverFoldersList(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<ProcessingData.filesList[]>>('/server_folders', {
    method: 'POST',
    data:options
  });
}


/** 开始处理文件夹 get */
export async function processFolder(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<ProcessingData.processFolder>>('/process_folder', {
    method: 'POST',
    data: options || {},
  });
}

/** 获取已经处理了的文件夹列表 get */
export async function getHistoryFolderList(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<ProcessingData.folderList[]>>('/folders', {
    method: 'POST',
    data:options
  });
}

/** 获取已经处理了的文件夹中的人脸 get */
export async function getHistoryFolderFace(options : {
  id: number;
  currentPage?: number;
  pageSize?: number;
}) {
   const { id, ...rest } = options;
  return request<BaseResponseBean.responsePage<ProcessingData.faces[]>>(`/folders/${id}/faces`, {
    method: 'POST',
    data:rest
  });
}


/** 获取已经处理了的文件夹中的人脸的所有数据 get */
export async function getHistoryFolderFaceGroup(options: { folderId: any,faceGroupId:any }) {
  return request<BaseResponseBean.responsePage<ProcessingData.faces[]>>(`/folders/${options.folderId}/faces/${options.faceGroupId}`, {
    method: 'GET',
  });
}


/** 创建集锦视频 get */
export async function createHighlights(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<ProcessingData.folderList[]>>('/highlights', {
    method: 'POST',
    data:options
  });
}


/** 获取进行中任务列表 get */
export async function getProcessingList(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<ProcessingData.folderList[]>>('/tasks/status', {
    method: 'POST',
    data:options
  });
}


/** 重试操作 get */
export async function taskRetry(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<ProcessingData.folderList[]>>('/tasks/retry', {
    method: 'POST',
    data:options
  });
}
